<div ba-panel ba-panel-class="with-scroll">
    <form class="form-horizontal" role="form">
        <div class="form-group">
            <div class="col-md-8 pull-left">
                <ul class="btn-list">
                    <li class="pull-left"><button type="button" class="btn btn-primary btn-with-icon" ng-click="addItem()"><i class="ion-plus-round"></i>添加用户</button></li>
                    <li class="pull-left"><button type="button" class="btn btn-primary btn-with-icon" ng-click="getData()"><i class="ion-search"></i>查询</button></li>
                </ul>
            </div>
        </div>
    </form>
    <div class="horizontal-scroll">
        <table class="table table-hover" st-pipe="callServer" st-table="displayed">
            <thead>
            <tr class="sortable black-muted-bg">
                <th class="table-id">序号</th>
                <th>登录用户名</th>
                <th>所属企业</th>
                <th>用户姓名</th>
                <th>重置密码</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody ng-show="!isLoading && !isFailed">
            <tr ng-repeat="item in displayed">
                <td class="table-id"><b>{{item.index}}</b></td>
                <td>{{item.title}}</td>
                <td>{{item.updateTime}}</td>
                <td><button class="status-button btn btn-xs btn-info" ng-click="previewItem(item)">预览</button></td>
                <td><button class="status-button btn btn-xs btn-{{item.active == 1 ? 'info' : 'warning'}}" ng-click="changeActive(item)">{{item.active == 1 ? "显示" : "隐藏"}}</button></td>
                <td><button class="status-button btn btn-xs btn-info" ng-click="editItem(item)">编辑</button></td>
                <td><button class="status-button btn btn-xs btn-danger" ng-click="deleteItem(item)">删除</button></td>
            </tr>
            </tbody>
            <tbody ng-show="!isLoading && isFailed">
            <tr>
                <td colspan="20" class="text-center">加载失败 ...</td>
            </tr>
            <tbody>
            <tbody ng-show="isLoading">
            <tr>
                <td colspan="20" class="text-center">加载中 ...</td>
            </tr>
            </tbody>
            <tfoot>
            <tr>
                <td colspan="20" class="text-center">
                    <div st-pagination="" st-items-by-page="itemsByPage" st-displayed-pages="5" st-template="app/mytheme/components/pagination.custom.html"></div>
                </td>
            </tr>
            </tfoot>
        </table>
    </div>
</div>